* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.page.active {
    display: block;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 登录卡片 */
.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.login-card h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.login-card p {
    color: #666;
    margin-bottom: 30px;
}

.wechat-login-btn {
    background: #07C160;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
}

.wechat-login-btn:hover {
    transform: translateY(-2px);
    background: #06ae56;
}

/* 表单卡片 */
.form-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* 复选框组 */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-group label:hover {
    background: #f8f9fa;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.submit-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    flex: 1;
}

.submit-btn:hover {
    background: #5a67d8;
}

.skip-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    flex: 1;
}

.skip-btn:hover {
    background: #7f8c8d;
}

/* AI生成器 */
.ai-generator {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.ai-generator h3 {
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
}

.ai-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ai-controls select,
.ai-controls button {
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
}

.ai-controls select {
    background: white;
    border: 2px solid #e9ecef;
}

.ai-controls button {
    background: #ff6b6b;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.ai-controls button:hover {
    background: #ff5252;
}

.ai-menu-container {
    margin-top: 20px;
}

.ai-menu-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.ai-menu-card h3 {
    margin-bottom: 15px;
    text-align: center;
}

.nutrition-facts {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 10px;
}

.nutrition-facts span {
    text-align: center;
    font-size: 0.9em;
}

.nutrition-highlight {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    font-style: italic;
}

/* 原有样式保持 */
.filter-section {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-section select {
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    background: white;
    font-size: 1em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.search-section input {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    width: 300px;
    font-size: 1em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-section button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    background: #ff6b6b;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.search-section button:hover {
    background: #ff5252;
}

.recipes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.recipe-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.recipe-card:hover {
    transform: translateY(-5px);
}

.recipe-card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.recipe-time {
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    display: inline-block;
    margin-bottom: 10px;
}

.recipe-category {
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    display: inline-block;
    margin-left: 10px;
}

.recipe-ingredients {
    margin: 15px 0;
    color: #666;
}

.recipe-steps {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
}

.nutrition-tips {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.nutrition-tips h3 {
    color: #667eea;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .filter-section {
        flex-direction: column;
        align-items: center;
    }
    
    .search-section {
        flex-direction: column;
        align-items: center;
    }
    
    .search-section input {
        width: 100%;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .ai-controls {
        flex-direction: column;
    }
    
    .ai-controls select,
    .ai-controls button {
        width: 100%;
    }
}
